package com.kgc.novel.domain.entity;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiParam;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;

import java.io.Serializable;
import java.time.LocalDateTime;

@Getter
@Setter
@NoArgsConstructor
@TableName("book_admin")
@Api(tags = "管理员用户管理类")
public class BookAdmin implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId(value = "user_id",type = IdType.ASSIGN_ID)
    private String adminId;

    @TableField("admin_name")
    @ApiParam("管理员姓名")
    private String adminName;

    @TableField("pass_word")
    @ApiParam("管理员密码")
    private String password;

    @TableField("nick_name")
    @ApiParam("管理员昵称")
    private String nickname;
    /**
     * 逻辑删除;默认0,1表示删除
     */
    @TableLogic(value = "0", delval = "1")
    @TableField("deleted")
    @ApiParam("逻辑删除;默认0,1表示删除")
    private Byte deleted;
    /**
     * 用户令牌
     */
    @TableField(exist = false)
    private String token;

    @TableField(exist = false)
    private String accessToken;

    @TableField(exist = false)
    private String refreshToken;

    @TableField(exist = false)
    private String tokenType;

    @TableField(exist = false)
    private Long expireIn;
}
